<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
//     解构表达式
// ES6允许按照一定模式从数组和对象中提取值，然后对变量进行赋值，称之为解构
// 1.数组
let arr = [1,2,3];
const [x,y,z] = arr;//x,y,z与arr中的每个位置对应来取值
// 2.对象
const person = {
    name:"cyl",
    age:22,
    language: ['java','go','javaScript','HTML']
};
const {name:n,age:a,language:l} = person;
console.log(n,a,l);
</script>